package br.com.sge.util;


import java.sql.SQLException;

import org.hibernate.Session;
import org.hibernate.Transaction;

import br.com.sge.entidades.Aluno;
import br.com.sge.entidades.Matricula;

/**
 *
 * @author Gustavo Rodrigues Torre
 */
public class HibernateTest {

    public static void main(String[] args) throws SQLException {

        //Aluno aluno = new Aluno();
    	Matricula matricula = new Matricula();

        Session session = HibernateUtil.getSessionFactory().openSession();
        Transaction t = session.beginTransaction();
        session.save(matricula);
        t.commit();
        //System.out.println("ID da matricula: " + matricula.getId());
        
        
       /* user = (Usuario) session.load(Usuario.class, 1L);
        System.out.println(user.getNome());*/

        session.close();

    }
}
